
library(foreign)
A <- read.spss("U:\\My Documents\\A.sav")

A <- data.frame(A)
head(A)


model <- 'i =~ 1*R1 + 1*R2 + 1*R3  
+ s =~ 0*R1 + 1*R2 + 2*R3 

 i ~~ s # covariance of intercept and slope
+ i~A #average motivation score with intercept
+ s~A #average motivation score with slope
+ '
fit <- growth(model, data=A ) 